/* eslint-disable */
/* tslint:disable */
/*
 * ---------------------------------------------------------------
 * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API        ##
 * ##                                                           ##
 * ## AUTHOR: acacode                                           ##
 * ## SOURCE: https://github.com/acacode/swagger-typescript-api ##
 * ---------------------------------------------------------------
 */

import { createRequest } from '@/request/index';

import {
  ApiResponse,
  baseUrl,
  FindPetsByStatusParams,
  FindPetsByTagsParams,
  Pet,
} from './data-contracts';

export class PetClass {
  /**
   * No description
   *
   * @tags pet
   * @name UploadFile
   * @summary uploads an image
   * @request POST:/pet/{petId}/uploadImage
   * @secure
   * @response `200` `ApiResponse` successful operation
   */
  static uploadFile = (
    petId: number,
    data: { additionalMetadata?: string; file?: File },
    loading?: boolean
  ) =>
    createRequest<ApiResponse>({
      url: baseUrl + `/pet/${petId}/uploadImage`,
      method: 'POST',
      loading,
      data: data,
    });
  /**
   * No description
   *
   * @tags pet
   * @name AddPet
   * @summary Add a new pet to the store
   * @request POST:/pet
   * @secure
   * @response `405` `void` Invalid input
   */
  static addPet = (body: Pet, loading?: boolean) =>
    createRequest<any>({
      url: baseUrl + `/pet`,
      method: 'POST',
      loading,
      data: body,
    });
  /**
   * No description
   *
   * @tags pet
   * @name UpdatePet
   * @summary Update an existing pet
   * @request PUT:/pet
   * @secure
   * @response `400` `void` Invalid ID supplied
   * @response `404` `void` Pet not found
   * @response `405` `void` Validation exception
   */
  static updatePet = (body: Pet, loading?: boolean) =>
    createRequest<any>({
      url: baseUrl + `/pet`,
      method: 'PUT',
      loading,
      data: body,
    });
  /**
   * @description Multiple status values can be provided with comma separated strings
   *
   * @tags pet
   * @name FindPetsByStatus
   * @summary Finds Pets by status
   * @request GET:/pet/findByStatus
   * @secure
   * @response `200` `(Pet)[]` successful operation
   * @response `400` `void` Invalid status value
   */
  static findPetsByStatus = (
    query: FindPetsByStatusParams,
    loading?: boolean
  ) =>
    createRequest<Pet[]>({
      url: baseUrl + `/pet/findByStatus`,
      method: 'GET',
      loading,
      query: query,
    });
  /**
   * @description Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
   *
   * @tags pet
   * @name FindPetsByTags
   * @summary Finds Pets by tags
   * @request GET:/pet/findByTags
   * @deprecated
   * @secure
   * @response `200` `(Pet)[]` successful operation
   * @response `400` `void` Invalid tag value
   */
  static findPetsByTags = (query: FindPetsByTagsParams, loading?: boolean) =>
    createRequest<Pet[]>({
      url: baseUrl + `/pet/findByTags`,
      method: 'GET',
      loading,
      query: query,
    });
  /**
   * @description Returns a single pet
   *
   * @tags pet
   * @name GetPetById
   * @summary Find pet by ID
   * @request GET:/pet/{petId}
   * @secure
   * @response `200` `Pet` successful operation
   * @response `400` `void` Invalid ID supplied
   * @response `404` `void` Pet not found
   */
  static getPetById = (petId: number, loading?: boolean) =>
    createRequest<Pet>({
      url: baseUrl + `/pet/${petId}`,
      method: 'GET',
      loading,
    });
  /**
   * No description
   *
   * @tags pet
   * @name UpdatePetWithForm
   * @summary Updates a pet in the store with form data
   * @request POST:/pet/{petId}
   * @secure
   * @response `405` `void` Invalid input
   */
  static updatePetWithForm = (
    petId: number,
    data: { name?: string; status?: string },
    loading?: boolean
  ) =>
    createRequest<any>({
      url: baseUrl + `/pet/${petId}`,
      method: 'POST',
      loading,
      data: data,
    });
  /**
   * No description
   *
   * @tags pet
   * @name DeletePet
   * @summary Deletes a pet
   * @request DELETE:/pet/{petId}
   * @secure
   * @response `400` `void` Invalid ID supplied
   * @response `404` `void` Pet not found
   */
  static deletePet = (petId: number, loading?: boolean) =>
    createRequest<any>({
      url: baseUrl + `/pet/${petId}`,
      method: 'DELETE',
      loading,
    });
}
